package entities;

import java.io.Serializable;

import javax.persistence.Embeddable;

@Embeddable
public class IdOFAD implements Serializable {
	private static final long serialVersionUID = 1L;

	long idCasaCentral;
	long nroOfad;
	
	public IdOFAD() {
		super();
	}
	public IdOFAD(long idCasaCentral, long nroOfad) {
		super();
		this.idCasaCentral = idCasaCentral;
		this.nroOfad = nroOfad;
	}
	public long getIdCasaCentral() {
		return idCasaCentral;
	}
	public void setIdCasaCentral(long idCasaCentral) {
		this.idCasaCentral = idCasaCentral;
	}
	public long getNroOfad() {
		return nroOfad;
	}
	public void setNroOfad(long nroOfad) {
		this.nroOfad = nroOfad;
	}
	

	public int hashCode() {
		return (int) Integer.parseInt((Long.toString(idCasaCentral)+Long.toString(nroOfad)));
	}


	
	public boolean equals(IdOFAD id){
		if ((this.idCasaCentral == id.idCasaCentral)&&(this.nroOfad == id.nroOfad))
				return true;
		return false;
	}
	
}
